const { Schema, model } = require('mongoose');
const collectionsSchema = new Schema({
    studentId: { // 所属学员 _id
        type: Schema.Types.ObjectId,
        ref: 'studentsModel'
    },
    exerciseId: {
        type: Schema.Types.ObjectId,
        ref: 'exercisesModel'
    }
}, { versionKey: false });
//2.设置数据模型，同时连接数据集合
module.exports.collectionsModel = model('collectionsModel', collectionsSchema, 'collections');